package com.cnunicom.modules.tra.task;

import com.cnunicom.modules.job.task.ITask;
import com.cnunicom.modules.tra.service.HomeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author: dingziyuan
 * @Date: 2020/1/31/031 15:14
 * @Description: 首页数据插入redis
 */
@Component("HomeTask")
public class HomeTask implements ITask {

    private Logger logger = LoggerFactory.getLogger(getClass());

    @Resource
    private HomeService homeService;


    @Override
    public void run(String params) {
        logger.debug("HomeTask定时任务正在执行，参数为：{}", params);
        homeService.homeDataToRedis();
    }
}
